Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Retry endpoint added #198

Merged
merged 21 commits into from
Jan 17, 2025
Merged

Feat: Retry endpoint added #198

merged 21 commits into from
Jan 17, 2025

Conversation

Mohiiit
Copy link
Contributor

@Mohiiit Mohiiit commented Dec 26, 2024

1. Created a new REST endpoint /jobs/:id/retry following RESTful conventions

  • Implemented retry logic with the following functionality:
    • Ensures the job is in a Failed state before allowing a retry.
    • Updates the job status to RetryAttempt.
    • Increments the retry metadata by 1.
    • Directly queues the job for processing.

2. Enhanced the /verify endpoint

  • Added support for the VerificationTimeout status.
  • The endpoint now supports jobs in both PendingVerification and VerificationTimeout states.
  • When invoked:
    • Resets the verification attempt counter to 0.
    • Increments the verification retry metadata by 1.
    • Directly queues the job for verification.

3. Enhanced the /process endpoint

  • Modified behavior to directly queue the job for processing, instead of calling the process function.

4. Improved Response Messaging

  • Each endpoint now provides a dedicated, clear response message.

5. Testing and Documentation Updates

  • All new functionality has been thoroughly tested.
  • Some tests were refactored to align with the new changes.
  • Documentation has been updated for the newly added features and also includes updates for some legacy code.

@coveralls
Copy link

coveralls commented Dec 26, 2024

Coverage Status

coverage: 67.086% (-0.4%) from 67.531%
when pulling 987a707 on feat/retry-job-status
into 3ec2873 on main.

@Mohiiit Mohiiit self-assigned this Dec 26, 2024
@Mohiiit Mohiiit requested a review from ocdbytes December 26, 2024 10:23
crates/orchestrator/src/jobs/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/jobs/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/jobs/mod.rs Show resolved Hide resolved
crates/orchestrator/src/jobs/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/jobs/types.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/routes/job_routes.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/routes/job_routes.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/routes/job_routes.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/jobs/types.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/routes/job_routes.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/routes/job_routes.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/tests/server/job_routes.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/routes/app_routes.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/routes/app_routes.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/routes/job_routes.rs Outdated Show resolved Hide resolved
@Mohiiit Mohiiit requested a review from apoorvsadana January 13, 2025 07:55
@Mohiiit Mohiiit requested a review from heemankv January 13, 2025 07:56
crates/orchestrator/src/jobs/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/jobs/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/routes/types.rs Show resolved Hide resolved
crates/orchestrator/src/routes/mod.rs Show resolved Hide resolved
crates/orchestrator/src/routes/job_routes.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/routes/job_routes.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/routes/job_routes.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/jobs/mod.rs Show resolved Hide resolved
crates/orchestrator/src/jobs/mod.rs Outdated Show resolved Hide resolved
crates/orchestrator/src/jobs/mod.rs Show resolved Hide resolved
@heemankv
Copy link
Contributor

Let's please also update the PR description with the latest revision of the implementation

Copy link
Contributor

@apoorvsadana apoorvsadana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@heemankv heemankv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Mohiiit Mohiiit merged commit 9000464 into main Jan 17, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants